package com.feri.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("t_order_item")
@NoArgsConstructor
public class OrderItem {
    @TableId(type = IdType.AUTO)
    private Long id;
    private double price;//金额
    private int num;//
    private long oid;
    private long gid;
    private Date ctime;

    public OrderItem(double price, int num, long oid, long gid) {
        this.price = price;
        this.num = num;
        this.oid = oid;
        this.gid = gid;
        this.ctime=new Date();
    }
}